<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>学生信息</title>
</head>
<body>
<center>
    <form method="get" th:object="${StudentInfo}" action="/StudentInfo/selectCourse">
    <h1>欢迎你<span th:text="${username}"/></h1>
    <h2>学生信息</h2>

    <table th:align="center" >
        <tr>
            <td>姓名</td>
            <td><input name="name" type="text" th:field="*{name}"/></td>
            <td> <span class="validationError"
                       th:if="${#fields.hasErrors('name')}"
                       th:errors="*{name}"></span></td>
        </tr>
        <tr>
            <td>学号</td>
            <td><input name="id" type="text" th:field="*{id}"/></td>
            <td> <span class="validationError"
                       th:if="${#fields.hasErrors('id')}"
                       th:errors="*{id}"></span></td>
        </tr>
        <tr>
            <td>年级</td>
            <td><input name="grade" type="text" th:field="*{grade}"/></td>
            <td> <span class="validationError"
                       th:if="${#fields.hasErrors('grade')}"
                       th:errors="*{grade}"></span></td>
        </tr>
        <tr>
            <td>专业</td>
            <td><input name="profession" type="text" th:field="*{profession}"/></td>
            <td> <span class="validationError"
                       th:if="${#fields.hasErrors('profession')}"
                       th:errors="*{profession}"></span></td>
        </tr>
        <tr>
            <td>学院</td>
            <td><input name="college" type="text" th:field="*{college}"/></td>
            <td> <span class="validationError"
                       th:if="${#fields.hasErrors('college')}"
                       th:errors="*{college}"></span></td>
        </tr>

    </table>
    <br>
    <button>点击选课</button>
    </form>
</center>

</body>
</html>